package com.zhoujunlin.dorm.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName studentaccount
 */
@TableName(value ="studentaccount")
@Data
public class Studentaccount implements Serializable {
    /**
     * 
     */
    @TableId
    private String accountstr;

    /**
     * 
     */
    private String username;

    /**
     * 
     */
    private Integer schoolnum;

    /**
     * 
     */
    private String password;

    /**
     * 
     */
    private Integer phonenumber;

    /**
     * 
     */
    private String address;

    /**
     * 
     */
    private String major;

    /**
     * 
     */
    private Date studytime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Studentaccount other = (Studentaccount) that;
        return (this.getAccountstr() == null ? other.getAccountstr() == null : this.getAccountstr().equals(other.getAccountstr()))
            && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername()))
            && (this.getSchoolnum() == null ? other.getSchoolnum() == null : this.getSchoolnum().equals(other.getSchoolnum()))
            && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
            && (this.getPhonenumber() == null ? other.getPhonenumber() == null : this.getPhonenumber().equals(other.getPhonenumber()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
            && (this.getMajor() == null ? other.getMajor() == null : this.getMajor().equals(other.getMajor()))
            && (this.getStudytime() == null ? other.getStudytime() == null : this.getStudytime().equals(other.getStudytime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAccountstr() == null) ? 0 : getAccountstr().hashCode());
        result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
        result = prime * result + ((getSchoolnum() == null) ? 0 : getSchoolnum().hashCode());
        result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
        result = prime * result + ((getPhonenumber() == null) ? 0 : getPhonenumber().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getMajor() == null) ? 0 : getMajor().hashCode());
        result = prime * result + ((getStudytime() == null) ? 0 : getStudytime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", accountstr=").append(accountstr);
        sb.append(", username=").append(username);
        sb.append(", schoolnum=").append(schoolnum);
        sb.append(", password=").append(password);
        sb.append(", phonenumber=").append(phonenumber);
        sb.append(", address=").append(address);
        sb.append(", major=").append(major);
        sb.append(", studytime=").append(studytime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}